#define _CRT_SECURE_NO_WARNINGS 1
int prime(int p)
{
    int a = 0, i = 2;
    if (p < 2) return 0;
    else if (p == 2) return 1;
    else {
        if ( i = 2; i < p; i++)
        {
            if (p % i == 0)
                return 0;
            else
                return 1;
        }
    }
}
int PrimeSum(int m, int n)
{
    int s = 0;
    if (m < 0)m = 2;
    for (m; m <= n; m++)
    {
        if (prime(m) == 1)
        {
            s += m;
        }
    }
    return s;
}
#include <stdio.h>
#include <math.h>

int prime(int p);
int PrimeSum(int m, int n);

int main()
{
    int m, n, p;

    scanf("%d %d", &m, &n);
    printf("Sum of ( ");
    for (p = m; p <= n; p++) {
        if (prime(p) != 0)
            printf("%d ", p);
    }
    printf(") = %d\n", PrimeSum(m, n));

    return 0;
}

